1. Exponential functions.
If you wish to define an exponential function with base
a
other than the natural base
,
then you can define the function in the usual manner. For example, if the base is 2, then
> g:=x->2^x;
defines the function, and you can evaluate and differentiate the function
f
without trouble. However, Maple does not recognize the letter e as the constant
, so to define the natural exponential function, we do as follows.
> f:=x->exp(x);
What this means is that the exponential function is a built in function for Maple, like the trigonometric functions. When we evaluate this function at the value x , Maple prints the answer in the usual notation that we are familiar with.
> f(x);
Let us check whether Maple knows how to differentiate the two exponential functions defined above.
> D(f)(x);D(g)(x);
Let us see if Maple can find the limit of the difference quotient for calculating the derivative of the exponential function at
.
> limit((f(x+h)-f(x))/h,h=0);
Similarly, we can find the limit of the difference quotient for bases other than the natural base
.
> limit((g(x+h)-g(x))/h,h=0);
Now let us address the question of how to differentiate functions that arise by composing the exponential function with other functions. Remember how the chain rule was stated in a previous lab:
.
Let us keep the exponential function
defined above, but define the function
.
> g:=x->tan(x);
Let us check that the function
really is given by the composition of
and
.
> (f@g)(x);
Let u=u(x), then by virtue of the chain rule we have
.
Now let us verify this formula for our function
, by computing its derivative in two ways, like we did on the chain rule problems.
> D(f@g)(x);D(f)(g(x));D(g)(x);D(f)(g(x))*D(g)(x);
Notice that in our formula,
corresponds to
, while
corresponds to
.
Submission:
Under certain circumstances a rumor spreads according to the equation
where
is the proportion of the population that knows the rumor at time
and
and
are positive constants.
(a) Find
.
(b) Find the rate of spread of the rumor.
(c) Graph p when a=10, k=0.5 with t measured in hours. Use the graph to estimate how long it will take for 80% of the population to hear the rumor.
In order to get Maple to find an answer to the limit, you will have to tell it to make some assumptions about the values of the parameters a and k . The following command tells Maple to assume that k is positive.
> assume(k,positive);
Make sure to include a nice graph for part c) which allows the reader to easily verify the estimate that you give.
Submission worksheet:
2. Orthogonal families of curves.
We already know that the tangent line to a
curve
at a point (
)
is given by the equation
. What about the equation of the line which
is perpendicular, or normal to the curve at that point. It has slope which is given by the negative reciprocal of the slope of the tangent line to the curve, so its equation is
.
Let us
consider an example. Suppose that
> f:=x->exp(tan(x)); a:=Pi/4;
Let us define the tangent and normal lines to the curve, and plot them along with the curve to illustrate that they are perpendicular to each other.
> T:=x->D(f)(a)*(x-a)+f(a);
> N:=x->(-1/D(f)(a))*(x-a)+f(a);
> plot([f,T,N],0..Pi/3,y=1..4,color=[red,blue,green],scaling=constrained);
Note that it is very important to choose scaling=constrained; otherwise the lines will not appear to be perpendicular to each other.
Let us consider a sequence of curves of the form
, for some values of
c,
and another sequence of curves of the form
, for some values of
k
. To see that any two such curves intersect at a right angle, show that the derivatives of each of these curves are negative reciprocals of each other at any value of
x
, so that their tangent lines are perpendicular at any point where the curves intersect. Let us plot some of these curves for various values of the constants.
> fnc1:=seq(ln(x)+c,c=-3..3);
> fnc2:=seq(-x^2/2+k,k=-3..3);
> plot([fnc1,fnc2],x=-1..3,y=-1..3,scaling=constrained);
From the plot, it does appear that the curves intersect perpendicularly.
Submission:
For the families of curves
, and
, show that they intersect perpendicularly at every point of intersection, and then plot several curves of each type in order to illustrate that this is true.
Submission worksheet: